import { Base } from '../../utils/base.js';

class Popular extends Base {
  constructor() {
    super();
  }

  /*获得最后上传*/
  getLatest(callback) {
    var param = {
      url: 'classic/latest',
      sCallback: function (data) {
        callback && callback(data);
      }
    };
    this.request(param);
  }
  /*获取上一个*/
  getPrevious(callback,index) {
    var param = {
      url: 'classic/' + index +'/previous',
      sCallback: function (data) {
        callback && callback(data);
      }
    };
    this.request(param);
  }
  /*获取下一个*/
  getNext(callback, index) {
    var param = {
      url: 'classic/' + index + '/next',
      sCallback: function (data) {
        callback && callback(data);
      }
    };
    this.request(param);
  }
}
export { Popular };